#include "widget.h"
#include "ui_widget.h"
#include <QtDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    ui->comboBox_2->addItem("可乐");
    ui->comboBox_2->addItem("芋圆葡萄");
    ui->comboBox_2->addItem("霸王茶姬");
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    //获取下拉框的信息
    QString name = ui->comboBox->currentText();
    QString beve = ui->comboBox_2->currentText();
    qDebug() << name << "喜欢喝 : " << beve;
    ui->label_2->setText(name + "喜欢喝 : " + beve);
}
